package com.hu.biz.encrypt;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @author 00351634
 * @version 1.0
 * @date 2024/10/15 9:14
 * @description: 加密配置文件
 */
@Data
@Component
@ConfigurationProperties(prefix = "chery.encrypt")
public class EncryptProperties {
    private Map<String, EncryptConfig> configMap;

    @Data
    public static class EncryptConfig {
        /**
         * 密钥 AES: Base64(密钥字符串); DES: Base64(密钥字符串); RSA: 公钥文件(public.pem)&私钥文件(private.pem)在classpath的路径
         */
        private String secret;
        /** 算法 */
        private String algorithm;
    }
}
